import requests
import re
from setting import DB_POOLS

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0"
}

url = DB_POOLS

response = requests.get(url, headers=headers, timeout=5)
pattern = re.compile(r'"ip":"(.*?)","port":(\d+)')
matches = pattern.findall(response.text)

for ip, port in matches:
    print(f"{ip}:{port}")